3.115 \(\int \frac{x^4 (c+d x^2+e x^4+f x^6)}{a+b x^2} \, dx\)

Optimal. Leaf size=172 \[ \frac{x^3 \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{3 b^4}-\frac{a x \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{b^5}+\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{b^{11/2}}+\frac{x^5 \left (a^2 f-a b e+b^2 d\right )}{5 b^3}+\frac{x^7 (b e-a f)}{7 b^2}+\frac{f x^9}{9 b} \]

[Out]

-((a*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x)/b^5) + ((b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x^3)/(3*b^4) + ((b^2*d
 - a*b*e + a^2*f)*x^5)/(5*b^3) + ((b*e - a*f)*x^7)/(7*b^2) + (f*x^9)/(9*b) + (a^(3/2)*(b^3*c - a*b^2*d + a^2*b
*e - a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(11/2)

________________________________________________________________________________________

Rubi [A]  time = 0.122713, antiderivative size = 172, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 2, integrand size = 30, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.067, Rules used = {1802, 205} \[ \frac{x^3 \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{3 b^4}-\frac{a x \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{b^5}+\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (a^2 b e+a^3 (-f)-a b^2 d+b^3 c\right )}{b^{11/2}}+\frac{x^5 \left (a^2 f-a b e+b^2 d\right )}{5 b^3}+\frac{x^7 (b e-a f)}{7 b^2}+\frac{f x^9}{9 b} \]

Antiderivative was successfully verified.

[In]

Int[(x^4*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2),x]

[Out]

-((a*(b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x)/b^5) + ((b^3*c - a*b^2*d + a^2*b*e - a^3*f)*x^3)/(3*b^4) + ((b^2*d
 - a*b*e + a^2*f)*x^5)/(5*b^3) + ((b*e - a*f)*x^7)/(7*b^2) + (f*x^9)/(9*b) + (a^(3/2)*(b^3*c - a*b^2*d + a^2*b
*e - a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(11/2)

Rule 1802

Int[(Pq_)*((c_.)*(x_))^(m_.)*((a_) + (b_.)*(x_)^2)^(p_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*Pq*(a + b*x
^2)^p, x], x] /; FreeQ[{a, b, c, m}, x] && PolyQ[Pq, x] && IGtQ[p, -2]

Rule 205

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[a/b, 2]*ArcTan[x/Rt[a/b, 2]])/a, x] /; FreeQ[{a, b}, x]
&& PosQ[a/b]

Rubi steps

\begin{align*} \int \frac{x^4 \left (c+d x^2+e x^4+f x^6\right )}{a+b x^2} \, dx &=\int \left (-\frac{a \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right )}{b^5}+\frac{\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x^2}{b^4}+\frac{\left (b^2 d-a b e+a^2 f\right ) x^4}{b^3}+\frac{(b e-a f) x^6}{b^2}+\frac{f x^8}{b}+\frac{a^2 b^3 c-a^3 b^2 d+a^4 b e-a^5 f}{b^5 \left (a+b x^2\right )}\right ) \, dx\\ &=-\frac{a \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x}{b^5}+\frac{\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x^3}{3 b^4}+\frac{\left (b^2 d-a b e+a^2 f\right ) x^5}{5 b^3}+\frac{(b e-a f) x^7}{7 b^2}+\frac{f x^9}{9 b}+\frac{\left (a^2 \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right )\right ) \int \frac{1}{a+b x^2} \, dx}{b^5}\\ &=-\frac{a \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x}{b^5}+\frac{\left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) x^3}{3 b^4}+\frac{\left (b^2 d-a b e+a^2 f\right ) x^5}{5 b^3}+\frac{(b e-a f) x^7}{7 b^2}+\frac{f x^9}{9 b}+\frac{a^{3/2} \left (b^3 c-a b^2 d+a^2 b e-a^3 f\right ) \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right )}{b^{11/2}}\\ \end{align*}

Mathematica [A]  time = 0.113696, size = 162, normalized size = 0.94 \[ \frac{x \left (21 a^2 b^2 \left (15 d+5 e x^2+3 f x^4\right )-105 a^3 b \left (3 e+f x^2\right )+315 a^4 f-3 a b^3 \left (105 c+35 d x^2+21 e x^4+15 f x^6\right )+b^4 x^2 \left (105 c+63 d x^2+45 e x^4+35 f x^6\right )\right )}{315 b^5}-\frac{a^{3/2} \tan ^{-1}\left (\frac{\sqrt{b} x}{\sqrt{a}}\right ) \left (-a^2 b e+a^3 f+a b^2 d-b^3 c\right )}{b^{11/2}} \]

Antiderivative was successfully verified.

[In]

Integrate[(x^4*(c + d*x^2 + e*x^4 + f*x^6))/(a + b*x^2),x]

[Out]

(x*(315*a^4*f - 105*a^3*b*(3*e + f*x^2) + 21*a^2*b^2*(15*d + 5*e*x^2 + 3*f*x^4) - 3*a*b^3*(105*c + 35*d*x^2 +
21*e*x^4 + 15*f*x^6) + b^4*x^2*(105*c + 63*d*x^2 + 45*e*x^4 + 35*f*x^6)))/(315*b^5) - (a^(3/2)*(-(b^3*c) + a*b
^2*d - a^2*b*e + a^3*f)*ArcTan[(Sqrt[b]*x)/Sqrt[a]])/b^(11/2)

________________________________________________________________________________________

Maple [A]  time = 0.004, size = 230, normalized size = 1.3 \begin{align*}{\frac{f{x}^{9}}{9\,b}}-{\frac{{x}^{7}af}{7\,{b}^{2}}}+{\frac{{x}^{7}e}{7\,b}}+{\frac{{x}^{5}{a}^{2}f}{5\,{b}^{3}}}-{\frac{{x}^{5}ae}{5\,{b}^{2}}}+{\frac{{x}^{5}d}{5\,b}}-{\frac{{x}^{3}{a}^{3}f}{3\,{b}^{4}}}+{\frac{{x}^{3}{a}^{2}e}{3\,{b}^{3}}}-{\frac{a{x}^{3}d}{3\,{b}^{2}}}+{\frac{{x}^{3}c}{3\,b}}+{\frac{{a}^{4}fx}{{b}^{5}}}-{\frac{{a}^{3}ex}{{b}^{4}}}+{\frac{{a}^{2}dx}{{b}^{3}}}-{\frac{acx}{{b}^{2}}}-{\frac{{a}^{5}f}{{b}^{5}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{4}e}{{b}^{4}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}-{\frac{{a}^{3}d}{{b}^{3}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}}+{\frac{{a}^{2}c}{{b}^{2}}\arctan \left ({bx{\frac{1}{\sqrt{ab}}}} \right ){\frac{1}{\sqrt{ab}}}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x)

[Out]

1/9*f*x^9/b-1/7/b^2*x^7*a*f+1/7/b*x^7*e+1/5/b^3*x^5*a^2*f-1/5/b^2*x^5*a*e+1/5/b*x^5*d-1/3/b^4*x^3*a^3*f+1/3/b^
3*x^3*a^2*e-1/3/b^2*x^3*a*d+1/3/b*x^3*c+1/b^5*a^4*f*x-1/b^4*a^3*e*x+1/b^3*a^2*d*x-1/b^2*a*c*x-a^5/b^5/(a*b)^(1
/2)*arctan(b*x/(a*b)^(1/2))*f+a^4/b^4/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))*e-a^3/b^3/(a*b)^(1/2)*arctan(b*x/(a*
b)^(1/2))*d+a^2/b^2/(a*b)^(1/2)*arctan(b*x/(a*b)^(1/2))*c

________________________________________________________________________________________

Maxima [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="maxima")

[Out]

Exception raised: ValueError

________________________________________________________________________________________

Fricas [A]  time = 1.50748, size = 770, normalized size = 4.48 \begin{align*} \left [\frac{70 \, b^{4} f x^{9} + 90 \,{\left (b^{4} e - a b^{3} f\right )} x^{7} + 126 \,{\left (b^{4} d - a b^{3} e + a^{2} b^{2} f\right )} x^{5} + 210 \,{\left (b^{4} c - a b^{3} d + a^{2} b^{2} e - a^{3} b f\right )} x^{3} - 315 \,{\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} \sqrt{-\frac{a}{b}} \log \left (\frac{b x^{2} - 2 \, b x \sqrt{-\frac{a}{b}} - a}{b x^{2} + a}\right ) - 630 \,{\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} x}{630 \, b^{5}}, \frac{35 \, b^{4} f x^{9} + 45 \,{\left (b^{4} e - a b^{3} f\right )} x^{7} + 63 \,{\left (b^{4} d - a b^{3} e + a^{2} b^{2} f\right )} x^{5} + 105 \,{\left (b^{4} c - a b^{3} d + a^{2} b^{2} e - a^{3} b f\right )} x^{3} + 315 \,{\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} \sqrt{\frac{a}{b}} \arctan \left (\frac{b x \sqrt{\frac{a}{b}}}{a}\right ) - 315 \,{\left (a b^{3} c - a^{2} b^{2} d + a^{3} b e - a^{4} f\right )} x}{315 \, b^{5}}\right ] \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="fricas")

[Out]

[1/630*(70*b^4*f*x^9 + 90*(b^4*e - a*b^3*f)*x^7 + 126*(b^4*d - a*b^3*e + a^2*b^2*f)*x^5 + 210*(b^4*c - a*b^3*d
 + a^2*b^2*e - a^3*b*f)*x^3 - 315*(a*b^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*sqrt(-a/b)*log((b*x^2 - 2*b*x*sqrt(-
a/b) - a)/(b*x^2 + a)) - 630*(a*b^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*x)/b^5, 1/315*(35*b^4*f*x^9 + 45*(b^4*e -
 a*b^3*f)*x^7 + 63*(b^4*d - a*b^3*e + a^2*b^2*f)*x^5 + 105*(b^4*c - a*b^3*d + a^2*b^2*e - a^3*b*f)*x^3 + 315*(
a*b^3*c - a^2*b^2*d + a^3*b*e - a^4*f)*sqrt(a/b)*arctan(b*x*sqrt(a/b)/a) - 315*(a*b^3*c - a^2*b^2*d + a^3*b*e
- a^4*f)*x)/b^5]

________________________________________________________________________________________

Sympy [A]  time = 0.867167, size = 325, normalized size = 1.89 \begin{align*} \frac{\sqrt{- \frac{a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log{\left (- \frac{b^{5} \sqrt{- \frac{a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{a^{4} f - a^{3} b e + a^{2} b^{2} d - a b^{3} c} + x \right )}}{2} - \frac{\sqrt{- \frac{a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right ) \log{\left (\frac{b^{5} \sqrt{- \frac{a^{3}}{b^{11}}} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{a^{4} f - a^{3} b e + a^{2} b^{2} d - a b^{3} c} + x \right )}}{2} + \frac{f x^{9}}{9 b} - \frac{x^{7} \left (a f - b e\right )}{7 b^{2}} + \frac{x^{5} \left (a^{2} f - a b e + b^{2} d\right )}{5 b^{3}} - \frac{x^{3} \left (a^{3} f - a^{2} b e + a b^{2} d - b^{3} c\right )}{3 b^{4}} + \frac{x \left (a^{4} f - a^{3} b e + a^{2} b^{2} d - a b^{3} c\right )}{b^{5}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x**4*(f*x**6+e*x**4+d*x**2+c)/(b*x**2+a),x)

[Out]

sqrt(-a**3/b**11)*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)*log(-b**5*sqrt(-a**3/b**11)*(a**3*f - a**2*b*e + a*b
**2*d - b**3*c)/(a**4*f - a**3*b*e + a**2*b**2*d - a*b**3*c) + x)/2 - sqrt(-a**3/b**11)*(a**3*f - a**2*b*e + a
*b**2*d - b**3*c)*log(b**5*sqrt(-a**3/b**11)*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)/(a**4*f - a**3*b*e + a**2
*b**2*d - a*b**3*c) + x)/2 + f*x**9/(9*b) - x**7*(a*f - b*e)/(7*b**2) + x**5*(a**2*f - a*b*e + b**2*d)/(5*b**3
) - x**3*(a**3*f - a**2*b*e + a*b**2*d - b**3*c)/(3*b**4) + x*(a**4*f - a**3*b*e + a**2*b**2*d - a*b**3*c)/b**
5

________________________________________________________________________________________

Giac [A]  time = 1.17473, size = 270, normalized size = 1.57 \begin{align*} \frac{{\left (a^{2} b^{3} c - a^{3} b^{2} d - a^{5} f + a^{4} b e\right )} \arctan \left (\frac{b x}{\sqrt{a b}}\right )}{\sqrt{a b} b^{5}} + \frac{35 \, b^{8} f x^{9} - 45 \, a b^{7} f x^{7} + 45 \, b^{8} x^{7} e + 63 \, b^{8} d x^{5} + 63 \, a^{2} b^{6} f x^{5} - 63 \, a b^{7} x^{5} e + 105 \, b^{8} c x^{3} - 105 \, a b^{7} d x^{3} - 105 \, a^{3} b^{5} f x^{3} + 105 \, a^{2} b^{6} x^{3} e - 315 \, a b^{7} c x + 315 \, a^{2} b^{6} d x + 315 \, a^{4} b^{4} f x - 315 \, a^{3} b^{5} x e}{315 \, b^{9}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x^4*(f*x^6+e*x^4+d*x^2+c)/(b*x^2+a),x, algorithm="giac")

[Out]

(a^2*b^3*c - a^3*b^2*d - a^5*f + a^4*b*e)*arctan(b*x/sqrt(a*b))/(sqrt(a*b)*b^5) + 1/315*(35*b^8*f*x^9 - 45*a*b
^7*f*x^7 + 45*b^8*x^7*e + 63*b^8*d*x^5 + 63*a^2*b^6*f*x^5 - 63*a*b^7*x^5*e + 105*b^8*c*x^3 - 105*a*b^7*d*x^3 -
 105*a^3*b^5*f*x^3 + 105*a^2*b^6*x^3*e - 315*a*b^7*c*x + 315*a^2*b^6*d*x + 315*a^4*b^4*f*x - 315*a^3*b^5*x*e)/
b^9